<div class="clear"></div>
<div id="newtabs" class="tabox ">
    <ul class="tabsnav">
        <li class="fea"><a href="#popular"> Phổ biến </a></li>
		<li class="rec"><a href=" #recent"> Mới nhất </a></li>
		<li class="pop"><a href="#comy"> Phản hồi </a></li>
    </ul>
            
<div id="popular" class="tabsdiv">
<?php 
	$my_query = new WP_Query('orderby=comment_count&showposts=5');
	while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>
<div class="fblock">
		<?php boxim() ?>

<h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo substr($post->post_title,0,20); ?></a></h3>
<p>  <?php the_content_rss('', TRUE, '', 10); ?> </p>

</div>
<?php endwhile; ?>
</div>
			
<div id="recent" class="tabsdiv">

<?php 
	$my_query = new WP_Query('showposts=5');
	while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID;
?>
<div class="fblock">
		<?php boxim() ?>

<h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php echo substr($post->post_title,0,20); ?></a></h3>
<p>  <?php the_content_rss('', TRUE, '', 10); ?> </p>

</div>
<?php endwhile; ?>

</div>

 <div id="comy" class="tabsdiv">
<?php
$comments = get_comments('status=approve&number=5');

if ($comments) {
    echo '<ul>';

    foreach ($comments as $comment) {
        echo '<li class="comlist"><a href="'. get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID .'" title="'.$comment->comment_author .' | '.get_the_title($comment->comment_post_ID).'">' . get_avatar( $comment->comment_author_email, 60);
        echo '<span class="recent_comment_name">' . $comment->comment_author . ': </span>';
		$comment_string = $comment->comment_content;
		$comment_excerpt = substr($comment_string,0,80);

		echo $comment_excerpt;

		if (strlen($comment_excerpt) > 79){
			echo ' ...';
		}
        echo '</a></li>';
    }
    echo '</ul>';
}

?>
</div>
</div>